package com.zt.rowmapper.sys;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.zt.model.sys.Sample;

/**
 * RowMapper实现 SampleMapper
 * 
 * @author zhangzhw
 * 
 */
public class SampleMapper implements RowMapper {
	@Override
	public Object mapRow(ResultSet rs, int paramInt) throws SQLException {
		Sample sample = new Sample();
		try {
			sample.setSampleId(rs.getLong("SAMPLE_ID"));
			sample.setSampleName(rs.getString("SAMPLE_NAME"));
			sample.setSampleDate(rs.getTimestamp("SAMPLE_DATE"));
			return sample;
		} catch (SQLException e) {
			throw e;
		}
	}
}
